import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedstate from 'vuex-persistedstate'
import user from "./modelus/user.js"
import school from './modelus/schools'
import post from './modelus/post'
import moment from './modelus/moment'
Vue.use(Vuex)

export default new Vuex.Store({
  modules: {
    user,
    school,
    post,
    moment
  },
  plugins: [
    createPersistedstate({
      // 默认存储在localstore
      key: 'erabbit-client-pc-store',
      paths: ['user', 'school']
    })
  ]
})
